package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.SystemMenu;
import cn.wolfcode.crm.query.ObjectQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SystemMenuMapper {
    void save(SystemMenu systemMenu);

    void delete(Long id);

    void update(SystemMenu systemMenu);

    SystemMenu get(Long id);

    List<SystemMenu> getAll();

    int queryForCount(ObjectQuery qo);

    List<SystemMenu> queryForList(ObjectQuery qo);

    List<Map> selectMenuByParentSn(String parentSn);

    List<Map> selectMenuByParentSnAndEmployeeId(@Param("parentSn") String parentSn, @Param("employeeId") Long employeeId);

    List<SystemMenu> queryRootMenu();

    List<SystemMenu> queryMenusByRoleId(Long roleId);
}
